package com.gz.servlet;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class HelloServlet extends HttpServlet {
    //看源码就发现，doGet()最终还是用到了service()方法
    public void doGet(HttpServletRequest req, HttpServletResponse resp){
        System.out.println("Helloservlet的 doGet被调用");
    }
    public void doPost(HttpServletRequest req, HttpServletResponse resp){
        System.out.println("Helloservlet的 doPost被调用");
    }
}
